﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using DoeObjects;
using System.ComponentModel.DataAnnotations;

namespace DoeLibsMVC.Models
{
    public class EditUserModel
    {
        [Required]
        [Display(Name = "E-Mail")]
        [DataType(DataType.EmailAddress)]
        public String EMail { get; set; }

        [Required]
        [Display(Name = "Password")]
        [DataType(DataType.Password)]
        public String OldPassword { get; set; }

        [Display(Name = "New password")]
        [DataType(DataType.Password)]
        public String NewPassword { get; set; }

        [Display(Name = "Confirm password")]
        [DataType(DataType.Password)]
        public String NewPasswordConfirm { get; set; }

        [Display(Name = "Room")]
        public String Room { get; set; }

        [Display(Name = "Uniphone")]
        public String UniPhone { get; set; }

        public EditUserModel() { }

        public EditUserModel(User user)
        {
            this.EMail = user.EMail;
            this.Room = user.Room;
            this.UniPhone = user.UniPhone;
        }
    }
}